import { bannerlist } from '../../../request/api'
const state = {
    bannerlist: []
}

const getters = {
    getList(state) {
        return state.bannerlist;
    }
}

const mutations = {
    REQ_LIST(state, payLoad) {
        state.bannerlist = payLoad
    }
}

const actions = {
    getBannerActions(context) {
        bannerlist()
            .then(res => {
                if (res.code == 200) {
                    let list = res.list?res.list:[];
                    context.commit('REQ_LIST', res.list?res.list : [])
                }
            })
    },
}

export default {
    state,
    getters,
    mutations,
    actions,
    namespaced: true
}